package com.pi.ibean.impl;

import java.util.List;

import javax.annotation.Resource;


import com.pi.dao.IFileTbDao;
import com.pi.dao.entiy.FileTb;
import com.pi.ibean.IFileDoBean;

public class FileDoBeanImpl implements IFileDoBean {
	
	@Resource
	private IFileTbDao fileTbDao;

	@Override
	public int saveFileText(List<String> list) {
		
		try {
			for (String text : list) {
				FileTb fileTb = new FileTb();
				fileTb.setFiletext(text);
				fileTbDao.save(fileTb);
			}
			
		} catch (Exception e) {
			return 1;
		}
		return 0;
	}

}
